package graphics;

public class Font {

public static final int UP				= 0;
public static final int UP_RIGHT		= UP+1;
public static final int RIGHT			= UP_RIGHT+1;
public static final int DOWN_RIGHT		= RIGHT+1;
public static final int DOWN			= DOWN_RIGHT+1;
public static final int DOWN_LEFT		= DOWN+1;
public static final int LEFT			= DOWN_LEFT+1;
public static final int UP_LEFT			= LEFT+1;


protected Font5x5 myFont;
protected int fontSize = 0;
	
	
public void printChar(char index,short color,int x,int y)
{
	
}
	

public int getTextSize(String text)
{
	return(	text.length()*(fontSize+1));

}



public void displayText(String text,int orientation,int position,int x, int y, short color) throws InterruptedException // font?? , xPos ??, yPos ??, scroll Direction ??, 
{


	int charCounter;
	int size=text.length();

	

	
	switch (orientation)
	{
	case UP:
		for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x,y-position+(charCounter*(fontSize+1)));
			}
		break;
		
		
	case UP_RIGHT:
		for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x+position-(charCounter*(fontSize+1)),y-position+(charCounter*(fontSize+1)));
			}
		break;
		
		
	case RIGHT:
		for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x+position-(charCounter*(fontSize+1)),y);
			}
		break;
		
	case DOWN_RIGHT:
			for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x+position-(charCounter*(fontSize+1)),y+position-(charCounter*(fontSize+1)));
			}
		break;
		
	case DOWN:
		for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x,y+position-(charCounter*(fontSize+1)));
			}
		break;
		
	case DOWN_LEFT:
		for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x-position+(charCounter*(fontSize+1)),y+position-(charCounter*(fontSize+1)));
			}
		break;
				
	case LEFT:
			for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x-position+(charCounter*(fontSize+1)),y);
			}
		break;
		
	case UP_LEFT:
			for (charCounter=0;charCounter<size;charCounter++)
			{
			myFont.printChar(text.charAt(charCounter), color,  x-position+(charCounter*(fontSize+1)),y-position+(charCounter*(fontSize+1)));
			}
		break;
	}	


		

	
}


}
